# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=recutils
pkgver=1.9
pkgrel=2
pkgdesc="Set of tools and libraries to access plain text databases called recfiles"
url="https://www.gnu.org/software/recutils/"
license="GPL-3.0-or-later"
arch="all"
depends="libgcrypt" # Required for encryption
source="https://ftp.gnu.org/gnu/recutils/recutils-$pkgver.tar.gz
	format-security.patch
	gcc14-implicit-function-declaration.patch
	"
subpackages="$pkgname-doc $pkgname-dev"

# secfixes:
#   1.9-r0:
#     - CVE-2021-46019
#     - CVE-2021-46021
#     - CVE-2021-46022

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
775b3b8925a4e5c6f04c6376291b966bdc271f172be2bca06b1f02155ecba12d916c22219f85fe0393f7f9f200f3788ab5fa5d522da2b84b2a0c0ec198318809  recutils-1.9.tar.gz
2d36d5c46d89f47e87c639c93e8ccfb0cb876a370b97ad47ec8eeeee7aa2c898187abe31a37b14b91e71af3a213900ee5fbcaf13155c3575347d37c1eb9fea6e  format-security.patch
bc74a3f82c96ec3870d27bd5fb6afc1f45c0fcf570f764476204197412a69c787cb2789143255a34b71a5b8b79c5765b79aefc9ee5876c088c9fd07f01d415c5  gcc14-implicit-function-declaration.patch
"
